<template>
  <el-form ref="form" :model="formData" label-width="80px">
    <el-form-item label="报名人">
      <el-input v-model="formData.people"></el-input>
    </el-form-item>
    <el-form-item label="报班类型">
      <el-input v-model="formData.time"></el-input>
    </el-form-item>
    <el-form-item label="报班详情">
      <el-input v-model="formData.content"></el-input>
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="submit(formData)">提交</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
import { reactive } from "@vue/reactivity";
export default {
  setup() {
    let formData = reactive({ id: "", content: "", people: "", type: "" });

    function submit(data) {
      // 向服务器发送请求
      console.log(data);
    }

    return { formData, submit };
  },
};
</script>